/*
 * @Author: syt.at.metgs.com
 * @Date: 2024-07-01 14:06:22
 * @Description:
 */
import { createStore } from 'vuex';

const files = import.meta.glob('./modules/*.js');
const modules = {};

for (const key in files) {
  modules[key.replace(/(\.\/modules\/|\.js)/g, '')] = files[key].default;
}

Object.keys(modules).forEach((key) => {
  modules[key]['namespaced'] = true;
});

export default createStore({
  modules,
});
